home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Editors / emacs / Emacs-1.14b1-sources / sources / kbd-patch / kbd-patch-data.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-23  |  1.2 KB  |  50 lines  |  [TEXT/EMAC]

  1. /*
  2.  * Copyright (C) 1994 Marc Parmet.
  3.  * This file is part of the Macintosh port of GNU Emacs.
  4.  *
  5.  * GNU Emacs is distributed in the hope that it will be useful,
  6.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  7.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  8.  * GNU General Public License for more details.
  9.  */
  10.  
  11. #define MODIFIER_KEYS (controlKey | optionKey | alphaLock | shiftKey | cmdKey)
  12. #define metaKey 1
  13. #define MODIFIER_XVECTOR(X) ((struct keyboard_patch_vector *)((X) & ((1<<26)-1)))
  14.  
  15. #define PATCH_MAGIC 0xabcdef89
  16.  
  17. typedef pascal long (*KeyTransProcPtr)(Ptr,short,long *);
  18.  
  19. enum {
  20.     uppKeyTransProcInfo = kPascalStackBased
  21.          | RESULT_SIZE(SIZE_CODE(sizeof(long)))
  22.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  23.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  24.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long *)))
  25. };
  26.  
  27. #if defined(powerc)
  28. #pragma options align=mac68k
  29. #endif
  30.  
  31. struct keyboard_patch_data {
  32.     long version;
  33.     UniversalProcPtr original;
  34.     ProcessSerialNumber emacs_psn;
  35.     long *v;
  36. };
  37.  
  38. struct keyboard_patch_vector { // This mimics a Lisp_Vector.
  39.     long size;
  40.     long fill;
  41.     struct modifier_code_pair {
  42.         long typed;
  43.         long denoted;
  44.     } contents[1];
  45. };
  46.  
  47. #if defined(powerc)
  48. #pragma options align=reset
  49. #endif
  50.